// const { defineConfig } = require('@vue/cli-service')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')

const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,


  configureWebpack: {
    plugins: [new NodePolyfillPlugin()],
  },

  transpileDependencies: true,

  devServer: {
    proxy: 'http://localhost:3000' // 配置访问的服务器地址
  }
})
module.exports = {
  devServer: {
    proxy: {
      '/api': {
        target: 'http://hj.xiaoyutongxue.com',
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  },
  pluginOptions: {
    electronBuilder: {

      nodeIntegration: true, // 或者根据你的 Electron 版本和配置调整此设置，例如在 Electron 12+ 中可能需要 contextIsolation: false 并使用 preload 脚本。
      contextIsolation: false,
      builderOptions: {
        "win": {
          icon: '/public/ico.png',
          "target": [
            {
              "target": "portable",
              "arch": [
                "x64"
              ]
            }
          ]
        },
        "portable": {
          "artifactName": "${productName}.${ext}"
        },
      }
    }
  }
}


